import Vue from "vue";
import Vuex from "vuex";
import createPersistedState from "vuex-persistedstate"

import home from './modules/home'
import login from "./modules/login";
import loading from './modules/loading'

Vue.use(Vuex);

const loginState = createPersistedState({
  paths: ['login.token'],
  storage: window.sessionStorage
})

export default new Vuex.Store({
  state: {},
  getters: {},
  mutations: {},
  actions: {},
  modules: {
    home,
    login,
    loading
  },
  plugins: [loginState]

});

